package com.ruyuan.eshop.common.mananger.impl;

import com.ruyuan.eshop.common.mananger.OrderMetaClientManager;
import com.ruyuan.eshop.common.domain.entity.OrderMetaDO;
import com.ruyuan.eshop.common.enums.OrderMetaKeyEnum;
import com.ruyuan.eshop.common.service.trade.order.OrderMetaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 订单操作SDK
 * @author pwd
 * @version 1.0
 */
@Service
public class OrderMetaClientManagerDefaultImpl implements OrderMetaClientManager {

    @Autowired
    private OrderMetaService orderMetaService;

    @Override
    public void add(OrderMetaDO orderMetaDO) {
        orderMetaService.add(orderMetaDO);
    }

    @Override
    public void updateMetaStatus(String orderSn, OrderMetaKeyEnum metaKey, String status) {
        orderMetaService.updateMetaStatus(orderSn, metaKey, status);
    }

    @Override
    public String getMetaValue(String orderSn, OrderMetaKeyEnum metaKey) {
        return orderMetaService.getMetaValue(orderSn, metaKey);
    }
}
